﻿using System;
using SharpSqlAnalyzer.nodes;
using SharpSqlAnalyzer.nodes.hive;

namespace SharpSqlAnalyzer.stmt.hive
{
	// Token: 0x020001B5 RID: 437
	public class THiveAnalyzeTable : TCustomSqlStatement
	{
		// Token: 0x06000E8C RID: 3724 RVA: 0x0030A372 File Offset: 0x00308572
		public THiveAnalyzeTable(EDbVendor dbvendor) : base(dbvendor)
		{
			this.sqlstatementtype = ESqlStatementType.ssthiveAnalyzeTable;
		}

		// Token: 0x170002A0 RID: 672
		// (get) Token: 0x06000E8D RID: 3725 RVA: 0x0030A386 File Offset: 0x00308586
		// (set) Token: 0x06000E8E RID: 3726 RVA: 0x0030A38E File Offset: 0x0030858E
		public virtual TObjectNameList Columns
		{
			get
			{
				return this.columns;
			}
			set
			{
				this.columns = value;
			}
		}

		// Token: 0x170002A1 RID: 673
		// (get) Token: 0x06000E8F RID: 3727 RVA: 0x0030A397 File Offset: 0x00308597
		// (set) Token: 0x06000E90 RID: 3728 RVA: 0x0030A39F File Offset: 0x0030859F
		public virtual bool NoScan
		{
			get
			{
				return this.noScan;
			}
			set
			{
				this.noScan = value;
			}
		}

		// Token: 0x170002A2 RID: 674
		// (get) Token: 0x06000E91 RID: 3729 RVA: 0x0030A3A8 File Offset: 0x003085A8
		// (set) Token: 0x06000E92 RID: 3730 RVA: 0x0030A3B0 File Offset: 0x003085B0
		public virtual bool PartitionScan
		{
			get
			{
				return this.partitionScan;
			}
			set
			{
				this.partitionScan = value;
			}
		}

		// Token: 0x170002A3 RID: 675
		// (get) Token: 0x06000E93 RID: 3731 RVA: 0x0030A3B9 File Offset: 0x003085B9
		// (set) Token: 0x06000E94 RID: 3732 RVA: 0x0030A3C1 File Offset: 0x003085C1
		public virtual TTable Table
		{
			get
			{
				return this.table;
			}
			set
			{
				this.table = value;
			}
		}

		// Token: 0x06000E95 RID: 3733 RVA: 0x0030A3CC File Offset: 0x003085CC
		public override int doParseStatement(TCustomSqlStatement psql)
		{
			if (this.rootNode == null)
			{
				return -1;
			}
			base.doParseStatement(psql);
			THiveAnalyzeSqlNode thiveAnalyzeSqlNode = (THiveAnalyzeSqlNode)this.rootNode;
			this.table = this.analyzeFromTable(thiveAnalyzeSqlNode.FromTable, new bool?(true));
			this.noScan = thiveAnalyzeSqlNode.NoScan;
			this.partitionScan = thiveAnalyzeSqlNode.PartitionScan;
			this.columns = thiveAnalyzeSqlNode.Columns;
			return 0;
		}

		// Token: 0x06000E96 RID: 3734 RVA: 0x0030A434 File Offset: 0x00308634
		public override void accept(TParseTreeVisitor v)
		{
			v.preVisit(this);
			v.postVisit(this);
		}

		// Token: 0x06000E97 RID: 3735 RVA: 0x0030A444 File Offset: 0x00308644
		public override void acceptChildren(TParseTreeVisitor v)
		{
			v.preVisit(this);
			v.postVisit(this);
		}

		// Token: 0x04001332 RID: 4914
		private TTable table;

		// Token: 0x04001333 RID: 4915
		private bool noScan;

		// Token: 0x04001334 RID: 4916
		private bool partitionScan;

		// Token: 0x04001335 RID: 4917
		private TObjectNameList columns;
	}
}
